import React, { useState, useEffect } from 'react';
import { Table, Tag } from 'antd';
import { request } from 'umi';

const NewsList = (props) => {
  return (
    <>
      <Table
        // params={{ cate }}
        columns={[
          {
            dataIndex: 'f001v',
            title: '标题',
            width: 160,
            key: 'F001V',
            render: (title, item) => (
              <a
                onMouseEnter={(e) => (e.target.style.color = '#722ED1')}
                onMouseLeave={(e) => (e.target.style.color = 'black')}
                style={{ color: 'black' }}
                href={item.f005v}
              >
                {title}
              </a>
            ),
          },
          {
            dataIndex: 'f002v',
            title: '标签',
            width: 40,
            key: 'F002V',
            render: (tag) => <Tag color="rgb(221,205,232)">{tag}</Tag>,
          },
          {
            dataIndex: 'secname',
            title: '公司',
            ellipsis: 'true',
            width: 40,
            key: 'SECNAME',
          },
          {
            dataIndex: '',
            title: '来源',
            ellipsis: 'true',
            width: 40,
            key: 'F003V',
            render: () => {
              return <span>{'巨浪网'} </span>;
            },
          },
          {
            dataIndex: 'rectime',
            title: '时间',
            ellipsis: 'true',
            width: 60,
            key: 'RECTIME',
          },
        ]}
        // request={getAnnouncement}
        // rowKey="outUserNo"
        pagination={{
          // showQuickJumper: true,
          defaultPageSize: 15,
        }}
        dataSource={props.dataSource}
        // toolBarRender={false}
        // search={false}
      />
    </>
  );
};

export default NewsList;
